CXX = g++

#ROOTSYS = /opt/products/root/5.26.00

INC = -I./inc -I$(ROOTSYS)/include -I$(ROOTSYS)/lib -I/usr/include -I/opt/rudeconfig-5.0.5
SRC = ./src
OBJ = ./obj
OBJS = $(OBJ)/Global.o $(OBJ)/TELFile.o $(OBJ)/TELAlign.o $(OBJ)/TELTrack.o $(OBJ)/TELFileRaw.o $(OBJ)/TelChek.o $(OBJ)/Align.o

ROOTLIBS = `root-config --cflags  --glibs`  -L$(ROOTSYS)/lib -lMinuit 
RUDELIBS = -L/scratch/install/rudeconfig/rudeconfig-5.0.5/.libs/ -lrudeconfig #-L/opt/products/lib -L/usr/local/lib/

LIBS = $(ROOTLIBS) $(RUDELIBS) #$(MINUITLIBS)

all: $(OBJS) ./TELAna.cxx
	$(CXX) -ggdb $(INC) $^ $(LIBS) -o read

$(OBJ)/%.o: $(SRC)/%.cxx
	$(CXX) -ggdb $(INC) -c $< -o $@

